/*
   MSRConst.h
   
   Copyright (C) 2006 LinuxOne, Inc. <Republic of korea>

   This library is free software; you can redistribute it and/or modify
   it under the terms of the GNU Lesser General Public License as
   published by the Free Software Foundation; either version 2.1
   of the License, or (at your option) any later version.

   This library is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
   Lessor General Public License for more details.

   You should have received a copy of the GNU Lessor General Public
   License along with this library; if not, write to the Free Software
   Foundation, inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

   Hyunjin Kim <mgc521@linuxone.co.kr>

   LinuxOne, Inc., hereby disclaims all copylight
   written by Hyunjin Kim, 20 December 2006
*/

#ifndef _BOOYO_POS_MSR_CONST_H_
#define _BOOYO_POS_MSR_CONST_H_

namespace booyopos
{

class CMSRConst : public CBooyoPOSConst
{
public:
	enum TracksToRead
	{
		MSR_TR_NONE			= 0,

		MSR_TR_1			= 1,
		MSR_TR_2			= 2,
		MSR_TR_3			= 3,
		MSR_TR_4			= 4,

		MSR_TR_1_2			= MSR_TR_1 | MSR_TR_2,
		MSR_TR_1_3			= MSR_TR_1 | MSR_TR_3,
		MSR_TR_1_4			= MSR_TR_1 | MSR_TR_4,
		MSR_TR_2_3			= MSR_TR_2 | MSR_TR_3,
		MSR_TR_2_4			= MSR_TR_2 | MSR_TR_4,
		MSR_TR_3_4			= MSR_TR_3 | MSR_TR_4,

		MSR_TR_1_2_3		= MSR_TR_1 | MSR_TR_2 | MSR_TR_3,
		MSR_TR_1_2_4		= MSR_TR_1 | MSR_TR_2 | MSR_TR_4,
		MSR_TR_1_3_4		= MSR_TR_1 | MSR_TR_3 | MSR_TR_4,
		MSR_TR_2_3_4		= MSR_TR_2 | MSR_TR_3 | MSR_TR_4,

		MSR_TR_1_2_3_4		= MSR_TR_1 | MSR_TR_2 | MSR_TR_3 | MSR_TR_4
	};

	enum ErrorReportingType
	{
		MSR_ERT_CARD		= 0,
		MSR_ERT_TRACK		= 1
	};

	enum ResultCodeExtended
	{
		EMST_START			= 1 + ERREXT,
		EMST_END			= 2 + ERREXT,
		EMST_PARITY			= 3 + ERREXT,
		EMST_LR				= 4 + ERREXT
	};

	/* Capabilities */
	bool capISO;
	bool capJISOne;
	bool capJISTwo;
	int capPowerReporting;
	bool capTransmitSentinels;
	bool capStatisticsReporting;
	bool capUpdateStatistics;
	bool capCompareFirmwareVersion;
	bool capUpdateFirmware;
	int capWritableTracks;

	/* Properties */
	std::string accountNumber;
	int dataCount;
	bool decodeData;
	int errorReportingType;
	std::string expirationDate;
	std::string firstName;
	std::string middleInitial;
	bool parseDecodeData;
	std::string serviceCode;
	std::string suffix;
	std::string surname;
	std::string title;
	int encodingMaxLength;
	char* track1Data;
	char* track1DiscretionaryData;
	char* track2Data;
	char* track2DiscretionaryData;
	char* track3Data;
	char* track4Data;
	int tracksToRead;
	int tracksToWrite;
	bool transmitSentinels; 
	int powerNotice;
	int powerState;
};

} // namespace booyopos

#endif // _BOOYO_POS_MSR_CONST_H_
